Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

This PR removes styled-components usage from ThemeProvider.stories.tsx as part of the ongoing migration away from styled-components in Storybook stories.

Changes Made

  • Removed Box component usage: Replaced all Box components with semantic div elements
  • Eliminated sx prop usage: Migrated inline styles to CSS module classes
  • Created CSS module classes: Added .ThemeBox and .AutoContents classes in ThemeProviderStories.module.css
  • Used proper CSS variables: Implemented theming support with variables like --fgColor-default, --bgColor-default, --borderColor-default, etc.
  • Updated imports: Changed from side-effect CSS import to named import for CSS modules

Before/After

Before:

<Box
  my={3}
  p={3}
  color="fg.default"
  bg="canvas.default"
  borderWidth="1px"
  borderStyle="solid"
  borderColor="border.default"
  borderRadius={2}
>
  Content
</Box>

After:

<div className={classes.ThemeBox}>
  Content
</div>

The visual appearance and functionality remain exactly the same, but the implementation no longer depends on styled-components. All existing tests pass and the Storybook builds successfully.

Fixes #6536.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link

changeset-bot bot commented Aug 8, 2025

⚠️ No Changeset found

Latest commit: 84610d4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Copilot Copilot AI changed the title [WIP] Update ThemeProvider.stories.tsx to no longer use styled-components Update ThemeProvider.stories.tsx to no longer use styled-components Aug 8, 2025
@Copilot Copilot AI requested a review from hectahertz August 8, 2025 15:38
Copilot finished work on behalf of hectahertz August 8, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ThemeProvider.stories.tsx to no longer use styled-components
2 participants